package com.liang.subject.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum CategoryTypeEnum {

    PRIMARY(1,"岗位大类"),
    SECOND(2,"二级分类");

    public int code;
    public String desc;

    public static CategoryTypeEnum getByCode(int code) {
        for (CategoryTypeEnum codeEnum : CategoryTypeEnum.values()) {
            if (codeEnum.code == code) {
                return codeEnum;
            }
        }
        return null;
    }
}
